//
//  BigStrategyCollectionReusableView.m
//  BeautifulShoppings
//
//  Created by GivenBmli on 16/9/5.
//  Copyright © 2016年 GivenBmli. All rights reserved.
//

#import "BigStrategyCollectionReusableView.h"
#import "StrategyCollectionViewCell.h"
#import "StrategyCollectionView.h"
#import "JXLDayAndNightMode.h"
#import "StrategyDetailsViewController.h"
#import "TAMacro.h"

@interface BigStrategyCollectionReusableView ()<StrategyCollectionViewDelegate>

@end
@implementation BigStrategyCollectionReusableView
- (instancetype)initWithFrame:(CGRect)frame{
    self  = [super initWithFrame:frame];
    if (self) {
        [self creatSubview:frame];
        
    }
    return self;
}


- (void)creatSubview:(CGRect)frame{
    
    self.strategyCollectionView = [[StrategyCollectionView alloc]initWithFrame:CGRectMake( 0 , -15, SCREEN_WIDTH, SCREEN_HEIGHT / 5.5)];
    _strategyCollectionView.delegate = self;
    
    self.lableTitle = [[UILabel alloc]initWithFrame:CGRectMake(SCREEN_WIDTH / 15, 0, SCREEN_WIDTH , SCREEN_HEIGHT / 30)];
    
    [self.LableTitleDown jxl_setDayMode:^(UIView *view) {
        self.lableTitle.backgroundColor = [UIColor whiteColor];
    } nightMode:^(UIView *view) {
        self.lableTitle.backgroundColor = [UIColor grayColor];
    }];
    self.lableTitle.text = @"专题";
    [self addSubview:self.lableTitle];
    self.LableTitleDown = [[UILabel alloc]initWithFrame:CGRectMake(SCREEN_WIDTH / 15, SCREEN_HEIGHT / 5   , SCREEN_WIDTH , 20)];
    [self.LableTitleDown jxl_setDayMode:^(UIView *view) {
        self.LableTitleDown.backgroundColor = [UIColor whiteColor];
    } nightMode:^(UIView *view) {
        self.LableTitleDown.backgroundColor = [UIColor grayColor];
    }];
    self.LableTitleDown.text = @"对象";
    [self addSubview:self.LableTitleDown];
    [self addSubview:self.strategyCollectionView];
}

- (void)didClickSelectItemAtIndexPath:(NSIndexPath *)indexPath str:(NSString *)str{
    
    self.str = str;
    [self.delegate didClickSelectItemAtIndexPathBigStrategy:indexPath str:self.str];
    
}

@end
